package thinkingJava.chapter15;

import java.util.List;

interface SuperPower {}
interface XRayVision extends SuperPower {
	void seeThroughWalls();
}
interface SuperHearing extends SuperPower {
	void hearSubtleNoises();
}
interface SuperSmelling extends SuperPower {
	void trackBySmell();
}
class SuperHero<POWER extends SuperPower> {
	POWER power;
	public SuperHero(POWER power) {
		this.power = power;
	}
	POWER getPower() {
		return power;
	}
}
class Supersleuth<POWER extends XRayVision> extends SuperHero<POWER> {

	public Supersleuth(POWER power) {
		super(power);
	}
	void see() {
		power.seeThroughWalls();
	}
}
class CanineHero<POWER extends SuperHearing & SuperSmelling> extends SuperHero<POWER> {
	public CanineHero(POWER power) {
		super(power);
	}
	void hear() {
		power.hearSubtleNoises();
	}
	void semll() {
		power.trackBySmell();
	}
}
class SuperHearSmell implements SuperHearing, SuperSmelling {
	public void trackBySmell() {
	}
	public void hearSubtleNoises() {
	}
}
class DogBoy extends CanineHero<SuperHearSmell> {

	public DogBoy() {
		super(new SuperHearSmell());
	}

}
public class EpicBattle {
	static <POWER extends SuperHearing> void useSuperHearing(SuperHero<POWER> hero) {
		hero.getPower().hearSubtleNoises();
	}
	static <POWER extends SuperHearing & SuperSmelling> void superFind(SuperHero<POWER> hero) {
		hero.getPower().hearSubtleNoises();
		hero.getPower().trackBySmell();
	}
	public static void main(String[] args) {
		DogBoy dogBoy = new DogBoy();
		useSuperHearing(dogBoy);
		superFind(dogBoy);
		List<? extends SuperHearing> audioBoys;
	}
}
